import 'package:flutter/material.dart';
import 'package:get/get.dart';

class CommunityMainLogic extends GetxController with GetTickerProviderStateMixin {
  final int index;

  CommunityMainLogic({this.index = 0});

  List<String> tabs = ['黄油', '小说', '有声', '色图'];

  late TabController tabCtr;

  @override
  void onInit() {
    tabCtr = TabController(length: tabs.length, vsync: this, initialIndex: index);
    super.onInit();
  }

  // 跳转相关模块的亚模块
  void jumpSubModule(int index, {int tabIndex = 0}) {
    tabCtr.index = index;
  }
}
